//package org.ricks.rpc.asm;
//
//import org.ricks.common.utils.ThreadUtils;
//import org.ricks.net.handler.MessageProcessor;
//import org.ricks.net.handler.Protocol;
//import org.ricks.net.rpc.AskPackage;
//
//import java.io.IOException;
//import java.nio.ByteBuffer;
//
//public class CalculatorServiceStub extends CalculatorService {
//    public CalculatorServiceStub() {
//    }
//
//    public int add(int var1, int var2) {
//        try {
//
////            AioSession session = RpcGroupManager.me().get("游戏模块").get(sid);
//            return 1;
//        } catch (Exception e) {
//            throw new RuntimeException("RPC调用异常");
//        }
//    }
//
//    public AioSession createSession (String ip , int port) {
//        AioClient aioClient = new AioClient(ip, port, new Protocol<AskPackage>() {
//            @Override
//            public AskPackage decode(ByteBuffer readBuffer, AioSession session) throws IOException {
//                return DataCodecKit.decode(readBuffer.array(), AskPackage.class);
//            }
//        }, new MessageProcessor<AskPackage>() {
//            @Override
//            public void process(AioSession session, AskPackage msg) {
//
//            }
//        });
//        return null;
//    }
//
//    public static void main(String[] args) {
//        CalculatorServiceStub calculatorServiceStub = new CalculatorServiceStub();
//        calculatorServiceStub.add(1, 2);
//
//        ThreadUtils.sleep(2000000);
//    }
//}
